package formula.business.dao;

import java.util.List;

import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import formula.business.model.Driver;

public class Main {

	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Main.class);

	//
	private static ClassPathXmlApplicationContext s_context = new ClassPathXmlApplicationContext(
			new String[] { "applicationContext.xml" });

	public static void main(String[] args) throws Exception {
		try {
			LoadDao service = s_context.getBean("loadDao", LoadDao.class);
			service.load();
			List<Driver> list = service.selectDrivers();
			logger.info("IL y  a :" + list.size() + " pilotes !");
		} catch (Throwable e) {
			e.printStackTrace();
		}
	}
}
